package com.test2.demo.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class Student {
    public int no;
    public String name;
    public String sex;
    public int grade;
    public String major;
    public String collage;
//构造器 Student student = new Student(1000001,"Shekai","男",2019,"软件工程","计算机学院")
    public Student(int no, String name, String sex, int grade, String major, String collage) {
        this.no = no;
        this.name = name;
        this.sex = sex;
        this.grade = grade;
        this.major = major;
        this.collage = collage;
    }

    @Override
    public String toString() {
        return "Student{" +
                "no=" + no +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", grade=" + grade +
                ", major='" + major + '\'' +
                ", collage='" + collage + '\'' +
                '}';
    }
}
